# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Maintainer: kpcyrd <git@rxv.cc>

pkgname=usbctl
pkgver=1.2
pkgrel=2
pkgdesc='Linux-hardened deny_new_usb control'
url='https://github.com/anthraxx/usbctl'
arch=('any')
license=('MIT')
depends=('linux-hardened' 'bash' 'usbutils' 'coreutils' 'diffutils' 'procps-ng' 'grep' 'util-linux')
checkdepends=('shellcheck')
optdepends=('sudo: elevate to root when needed')
source=(${url}/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz
        ${url}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.gz.sig)
sha512sums=('26395f6723787998c71f296cd6f14ce4f7215957ec6cf8ca732e03ebf0b66c67ad60862c8b5970e2ac69a8a00c957d98712f182bba5893058b37f748d970753b'
            'SKIP')
b2sums=('4b9c5fb37de2ac363757d9dbd109f4dc7adc159853049def4f5f8bb1d58ef6bc2fa67a206988e5aaccc6a57a74798fb6cf368d766b93cc7d0e8d9df2425c11e2'
        'SKIP')
validpgpkeys=('E240B57E2C4630BA768E2F26FC1B547C8D8172C8') # Levente Polyak

check() {
  cd ${pkgname}-${pkgver}
  make test
}

package() {
  cd ${pkgname}-${pkgver}
  make DESTDIR="${pkgdir}" MANDIR=/share/man/man1 install
  install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}

# vim:set ts=2 sw=2 et:
